package lzc.demo.spring.cloud;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 这边的@RefreshScope注解不能少，否则即使调用/refresh，配置也不会刷新--》ms-config-client-eureka-refresh
 *
 */
//@RefreshScope
@RestController
public class ConfigClientController {

	@Value("${profile}")
	private String profile;

	@GetMapping("/profile")
	public String getProfile() {
		return this.profile;
	}
}
